<div class="container_12 content-wrapper">
	<div class="grid_12">
    
    <h2>My Cart</h2>
    <?php echo $this->upload->display_errors('<div class="error">', '</div>');
	flash(); //display flash data ?>
<?php if($this->cart->total_items() > 0) :?>

<?php echo form_open_multipart('home/my_cart'); ?>

<table cellpadding="6" cellspacing="1" style="width:100%" border="0" class="tbl-cart">

<tr>
  <th>QTY</th>
  <th>Name</th>
  <th style="text-align:right">Price</th>
  <th style="text-align:right">Sub-Total</th>
</tr>

<?php 
	$ctr = 1;
	
?>

<?php foreach ($this->cart->contents() as $items): ?>
		
	

	<tr class="<?php echo $ctr%2 == 0 ? 'odd' : 'even'; ?>" >
		<?php $i = 'items['.$ctr.']';  echo form_hidden($i.'[rowid]', $items['rowid']); ?>
	  <td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td>
	  <td>
		<?php echo $items['name']; ?>

			<?php if ($this->cart->has_options($items['rowid']) == TRUE): ?>

				<p>
					<?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?>

						<strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br />

					<?php endforeach; ?>
				</p>

			<?php endif; ?>

	  </td>
	  <td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td>
	  <td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td>
	</tr>

<?php $ctr++; ?>

<?php endforeach; ?>

<tr class="total-row">
  <td colspan="4" class="right" style="text-align:right">Total: PHP <?php echo $this->cart->format_number($this->cart->total()); ?></td>
</tr>

</table>


<div class="cart-left">
<a href="<?php echo site_url('home/products')?>">Continue Shopping</a>
<input type="submit" class="update-cart dbtn" value="Udpdate" name="update">
<div class="clear">&nbsp;</div>
</div>
<?php echo form_fieldset('Proof of payment'); ?>
<div class="input-block">
	<p>Please upload an image proving you have payed for the items</p>
	
<input type="file" name="userfile" size="20" /></div>

<div class="note">File must not be greater than 2mb and not greater than 1024x768 resolution</div>

<div class="cart-right">
<input type="submit" class="checkout dbtn" value="Checkout" name="checkout">
</div>
<?php echo form_fieldset_close();?>

<?php else:?>
	<div class="msg notice"><span></span><h5>Notice</h5>No Items available on your shopping cart</div>

<?php endif;?>
</div>

</div>